using System.Data.Entity;

namespace ObjectMapper.Benchmark.DataModel
{
    public class DatabaseContext : DbContext 
    {
        static DatabaseContext()
        {
            Database.SetInitializer<DatabaseContext>(null);
        }

        public DatabaseContext()
            : base("Name=AdventureWorks")
        {
        }

        public DatabaseContext(string connectionString) : base(connectionString)
        {
        }

        public IDbSet<DatabaseLog> DatabaseLog { get; set; }

        public IDbSet<ErrorLog> ErrorLog { get; set; }

        public IDbSet<Department> Department { get; set; }

        public IDbSet<Employee> Employee { get; set; }

        public IDbSet<EmployeeDepartmentHistory> EmployeeDepartmentHistory { get; set; }

        public IDbSet<EmployeePayHistory> EmployeePayHistory { get; set; }

        public IDbSet<JobCandidate> JobCandidate { get; set; }

        public IDbSet<Shift> Shift { get; set; }

        public IDbSet<Address> Address { get; set; }

        public IDbSet<AddressType> AddressType { get; set; }

        public IDbSet<BusinessEntity> BusinessEntity { get; set; }

        public IDbSet<BusinessEntityAddress> BusinessEntityAddress { get; set; }

        public IDbSet<BusinessEntityContact> BusinessEntityContact { get; set; }

        public IDbSet<ContactType> ContactType { get; set; }

        public IDbSet<CountryRegion> CountryRegion { get; set; }

        public IDbSet<EmailAddress> EmailAddress { get; set; }

        public IDbSet<Password> Password { get; set; }

        public IDbSet<Person> Person { get; set; }

        public IDbSet<PersonPhone> PersonPhone { get; set; }

        public IDbSet<PhoneNumberType> PhoneNumberType { get; set; }

        public IDbSet<StateProvince> StateProvince { get; set; }

        public IDbSet<BillOfMaterials> BillOfMaterials { get; set; }

        public IDbSet<Culture> Culture { get; set; }

        public IDbSet<Illustration> Illustration { get; set; }

        public IDbSet<Location> Location { get; set; }

        public IDbSet<Product> Product { get; set; }

        public IDbSet<ProductCategory> ProductCategory { get; set; }

        public IDbSet<ProductCostHistory> ProductCostHistory { get; set; }

        public IDbSet<ProductDescription> ProductDescription { get; set; }

        public IDbSet<ProductInventory> ProductInventory { get; set; }

        public IDbSet<ProductListPriceHistory> ProductListPriceHistory { get; set; }

        public IDbSet<ProductModel> ProductModel { get; set; }

        public IDbSet<ProductModelIllustration> ProductModelIllustration { get; set; }

        public IDbSet<ProductModelProductDescriptionCulture> ProductModelProductDescriptionCulture { get; set; }

        public IDbSet<ProductPhoto> ProductPhoto { get; set; }

        public IDbSet<ProductProductPhoto> ProductProductPhoto { get; set; }

        public IDbSet<ProductReview> ProductReview { get; set; }

        public IDbSet<ProductSubcategory> ProductSubcategory { get; set; }

        public IDbSet<ScrapReason> ScrapReason { get; set; }

        public IDbSet<TransactionHistory> TransactionHistory { get; set; }

        public IDbSet<TransactionHistoryArchive> TransactionHistoryArchive { get; set; }

        public IDbSet<UnitMeasure> UnitMeasure { get; set; }

        public IDbSet<WorkOrder> WorkOrder { get; set; }

        public IDbSet<WorkOrderRouting> WorkOrderRouting { get; set; }

        public IDbSet<ProductVendor> ProductVendor { get; set; }

        public IDbSet<PurchaseOrderDetail> PurchaseOrderDetail { get; set; }

        public IDbSet<PurchaseOrderHeader> PurchaseOrderHeader { get; set; }

        public IDbSet<ShipMethod> ShipMethod { get; set; }

        public IDbSet<Vendor> Vendor { get; set; }

        public IDbSet<CountryRegionCurrency> CountryRegionCurrency { get; set; }

        public IDbSet<CreditCard> CreditCard { get; set; }

        public IDbSet<Currency> Currency { get; set; }

        public IDbSet<CurrencyRate> CurrencyRate { get; set; }

        public IDbSet<Customer> Customer { get; set; }

        public IDbSet<PersonCreditCard> PersonCreditCard { get; set; }

        public IDbSet<SalesOrderDetail> SalesOrderDetail { get; set; }

        public IDbSet<SalesOrderHeader> SalesOrderHeader { get; set; }

        public IDbSet<SalesOrderHeaderSalesReason> SalesOrderHeaderSalesReason { get; set; }

        public IDbSet<SalesPerson> SalesPerson { get; set; }

        public IDbSet<SalesPersonQuotaHistory> SalesPersonQuotaHistory { get; set; }

        public IDbSet<SalesReason> SalesReason { get; set; }

        public IDbSet<SalesTaxRate> SalesTaxRate { get; set; }

        public IDbSet<SalesTerritory> SalesTerritory { get; set; }

        public IDbSet<SalesTerritoryHistory> SalesTerritoryHistory { get; set; }

        public IDbSet<ShoppingCartItem> ShoppingCartItem { get; set; }

        public IDbSet<SpecialOffer> SpecialOffer { get; set; }

        public IDbSet<SpecialOfferProduct> SpecialOfferProduct { get; set; }

        public IDbSet<Store> Store { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            modelBuilder.Configurations.Add(new DatabaseLogConfiguration());
            modelBuilder.Configurations.Add(new ErrorLogConfiguration());
            modelBuilder.Configurations.Add(new DepartmentConfiguration());
            modelBuilder.Configurations.Add(new EmployeeConfiguration());
            modelBuilder.Configurations.Add(new EmployeeDepartmentHistoryConfiguration());
            modelBuilder.Configurations.Add(new EmployeePayHistoryConfiguration());
            modelBuilder.Configurations.Add(new JobCandidateConfiguration());
            modelBuilder.Configurations.Add(new ShiftConfiguration());
            modelBuilder.Configurations.Add(new AddressConfiguration());
            modelBuilder.Configurations.Add(new AddressTypeConfiguration());
            modelBuilder.Configurations.Add(new BusinessEntityConfiguration());
            modelBuilder.Configurations.Add(new BusinessEntityAddressConfiguration());
            modelBuilder.Configurations.Add(new BusinessEntityContactConfiguration());
            modelBuilder.Configurations.Add(new ContactTypeConfiguration());
            modelBuilder.Configurations.Add(new CountryRegionConfiguration());
            modelBuilder.Configurations.Add(new EmailAddressConfiguration());
            modelBuilder.Configurations.Add(new PasswordConfiguration());
            modelBuilder.Configurations.Add(new PersonConfiguration());
            modelBuilder.Configurations.Add(new PersonPhoneConfiguration());
            modelBuilder.Configurations.Add(new PhoneNumberTypeConfiguration());
            modelBuilder.Configurations.Add(new StateProvinceConfiguration());
            modelBuilder.Configurations.Add(new BillOfMaterialsConfiguration());
            modelBuilder.Configurations.Add(new CultureConfiguration());
            modelBuilder.Configurations.Add(new IllustrationConfiguration());
            modelBuilder.Configurations.Add(new LocationConfiguration());
            modelBuilder.Configurations.Add(new ProductConfiguration());
            modelBuilder.Configurations.Add(new ProductCategoryConfiguration());
            modelBuilder.Configurations.Add(new ProductCostHistoryConfiguration());
            modelBuilder.Configurations.Add(new ProductDescriptionConfiguration());
            modelBuilder.Configurations.Add(new ProductInventoryConfiguration());
            modelBuilder.Configurations.Add(new ProductListPriceHistoryConfiguration());
            modelBuilder.Configurations.Add(new ProductModelConfiguration());
            modelBuilder.Configurations.Add(new ProductModelIllustrationConfiguration());
            modelBuilder.Configurations.Add(new ProductModelProductDescriptionCultureConfiguration());
            modelBuilder.Configurations.Add(new ProductPhotoConfiguration());
            modelBuilder.Configurations.Add(new ProductProductPhotoConfiguration());
            modelBuilder.Configurations.Add(new ProductReviewConfiguration());
            modelBuilder.Configurations.Add(new ProductSubcategoryConfiguration());
            modelBuilder.Configurations.Add(new ScrapReasonConfiguration());
            modelBuilder.Configurations.Add(new TransactionHistoryConfiguration());
            modelBuilder.Configurations.Add(new TransactionHistoryArchiveConfiguration());
            modelBuilder.Configurations.Add(new UnitMeasureConfiguration());
            modelBuilder.Configurations.Add(new WorkOrderConfiguration());
            modelBuilder.Configurations.Add(new WorkOrderRoutingConfiguration());
            modelBuilder.Configurations.Add(new ProductVendorConfiguration());
            modelBuilder.Configurations.Add(new PurchaseOrderDetailConfiguration());
            modelBuilder.Configurations.Add(new PurchaseOrderHeaderConfiguration());
            modelBuilder.Configurations.Add(new ShipMethodConfiguration());
            modelBuilder.Configurations.Add(new VendorConfiguration());
            modelBuilder.Configurations.Add(new CountryRegionCurrencyConfiguration());
            modelBuilder.Configurations.Add(new CreditCardConfiguration());
            modelBuilder.Configurations.Add(new CurrencyConfiguration());
            modelBuilder.Configurations.Add(new CurrencyRateConfiguration());
            modelBuilder.Configurations.Add(new CustomerConfiguration());
            modelBuilder.Configurations.Add(new PersonCreditCardConfiguration());
            modelBuilder.Configurations.Add(new SalesOrderDetailConfiguration());
            modelBuilder.Configurations.Add(new SalesOrderHeaderConfiguration());
            modelBuilder.Configurations.Add(new SalesOrderHeaderSalesReasonConfiguration());
            modelBuilder.Configurations.Add(new SalesPersonConfiguration());
            modelBuilder.Configurations.Add(new SalesPersonQuotaHistoryConfiguration());
            modelBuilder.Configurations.Add(new SalesReasonConfiguration());
            modelBuilder.Configurations.Add(new SalesTaxRateConfiguration());
            modelBuilder.Configurations.Add(new SalesTerritoryConfiguration());
            modelBuilder.Configurations.Add(new SalesTerritoryHistoryConfiguration());
            modelBuilder.Configurations.Add(new ShoppingCartItemConfiguration());
            modelBuilder.Configurations.Add(new SpecialOfferConfiguration());
            modelBuilder.Configurations.Add(new SpecialOfferProductConfiguration());
            modelBuilder.Configurations.Add(new StoreConfiguration());
        }
    }
}